<template>
	<el-drawer title="招标项目详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="招标标题" prop="title">{{form.title}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="项目编号" prop="codeNo">{{form.codeNo}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="招标年度" prop="year">{{form.year}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="招标部门" prop="deptName">{{form.deptName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="招标类型" prop="inviteTypeName">{{form.inviteTypeName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="是否分包" prop="packageType">
								<el-tag v-if="form.packageType=='0'" type="success" effect="dark">整包</el-tag>
								<el-tag v-else-if="form.packageType=='1'" type="primary" effect="dark">分包</el-tag>
								<el-tag v-else type="info" effect="dark">未知</el-tag>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="开始时间" prop="beginTime">{{form.beginTime}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="结束时间" prop="endTime">{{form.endTime}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="评标小组" prop="teamName">{{form.teamName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="投标企业" prop="joinEntName">{{form.joinEntName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="备注说明" prop="remark">{{form.remark}}</el-form-item>
					<el-form-item label="招标文件" prop="attachId">
						<attach-menu v-model:attachIds="form.attachId" :roleFlag="3" :preview="true"></attach-menu>
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'
export default {
	emits: ['success', 'closed'],
	components: {
		AttachMenu,
	},
	data() {
		return {
			loading: false,
			form: {
				recordId:'',
				title: '',
				codeNo: "",
				inviteTypeName: '',
				packageType: '0',
				year: '',
				joinEntName: '',
				attachId:'',
				deptId:'',
				teamName:'',
				beginTime:'',
				endTime:'',
				remark:'',
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model){
			this.model=model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data){
			this.form.recordId = data.recordId
			this.form.title = data.title
			this.form.codeNo = data.codeNo
			this.form.inviteTypeName = data.inviteTypeName
			this.form.packageType = data.packageType
			this.form.year = data.year
			this.form.teamName = data.teamName
			this.form.joinEnt = data.joinEnt
			this.form.joinEntName = data.joinEntName
			this.form.attachId = data.attachId
			this.form.deptName = data.deptName
			this.form.beginTime = data.beginTime
			this.form.endTime = data.endTime
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
</style>
